const mongoose = require('mongoose')

function connectDb() {
  mongoose.connect("mongodb://127.0.0.1:27017/fund_train", {
    useUnifiedTopology: true,
    useNewUrlParser: true,
    // useFindAndModify: false
  })
  .then(() => {
    console.log("链接数据库成功")
  })
  .catch((error) => {
    console.log("链接数据库失败", error)
  });
}

export default connectDb
